{% load i18n xadmin_forms %}
<div class="inline-group">
<style>
.ui-widget-overlay { position: absolute; top: 0; left: 300px; width: 3%; height: 100%; align:right; }
</style>  

{{ inline_admin_formset.formset.management_form }}
{{ inline_admin_formset.formset.non_form_errors }}

{% for inline_admin_form in inline_admin_formset %}
<div class="inline-related{% if forloop.last %} last-related{% endif %}">
  <h3><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b>&nbsp;{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %} #{{ forloop.counter }}{% endif %}
        {%if inline_admin_formset.opts.collapseable %} 
        <a href="#" onclick="toggle('#fs{{ forloop.counter }}', this);">
        {% if not inline_admin_form.form.errors %}{%if inline_admin_formset.opts.initial_collapsed %}+{% else %}-{% endif %}{% endif %}</a>
        {%endif%}
    {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
  </h3>
  {% if inline_admin_form.show_url %}
  <p><a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/">{% trans "View on site" %}</a></p>
  {% endif %}
  
  {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %}
  <div id="fs{{ forloop.counter }}" class="{% if not inline_admin_form.form.errors %}{%if inline_admin_formset.opts.initial_collapsed %}inside{% endif %}{% endif %}">  
  {% for fieldset in inline_admin_form %}
    {% include "admin/includes/fieldset.html" %}
  {% endfor %}
  {% if inline_admin_form.has_auto_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
  {{ inline_admin_form.fk_field.field }}
  </div>
</div>
{% endfor %}

{# <ul class="tools"> #}
{#   <li><a class="add" href="">Add another {{ inline_admin_formset.opts.verbose_name|title }}</a></li> #}
{# </ul> #}
</div>
